package com.tracy.life.discovery.prensenter;

import com.tracy.life.bean.HotStrategyBean;
import com.tracy.life.discovery.model.StrategyHotModel;
import com.tracy.life.discovery.model.onResultListener;
import com.tracy.life.discovery.view.StrategyHotView;

import java.util.List;

/**
 * Created by asus on 2016/7/20.
 */
public class StrategyHotPresenter {
    private StrategyHotModel model;
    private StrategyHotView mStrategyHotView;

    public StrategyHotPresenter(final StrategyHotView strategyHotView) {
        this.model = new StrategyHotModel(new onResultListener() {
            @Override
            public void onFailure() {
                strategyHotView.loadFailure();
            }

            @Override
            public void onSuccess(List<HotStrategyBean.DataBean.CollectionsBean> collections) {
                strategyHotView.loadSuccess(collections);
            }
        });

        this.mStrategyHotView = strategyHotView;
    }

    public void loadDatas(){
        model.loadDatas();
    }
}
